home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / AppKernel.subproj / eTApp.h next >
Encoding:
C/C++ Source or Header  |  1994-10-22  |  5.1 KB  |  338 lines

  1. {\rtf0\ansi{\fonttbl\f0\fmodern Courier;\f1\ftech Symbol;\f2\fmodern Ohlfs;}
  2. \margl40
  3. \margr40
  4. {\colortbl;\red0\green0\blue0;}
  5. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 //—————————————————————————————————————————————————————————————————————————————\
  6. //
  7. \i     
  8. \b FILENAME
  9. \b0 :    
  10. \b\i0 eTApp.h \
  11.  
  12. \b0 //
  13. \i     
  14. \b SUMMARY
  15. \b0 :    
  16. \b\i0 Header for the eTApp class, the abstract application controller
  17. \b0 \
  18. //    
  19. \b\i SUPERCLASS
  20. \b0 :
  21. \i0     
  22. \b Object:eTApp
  23. \b0 \
  24. //    
  25. \b\i PROTOCOLS
  26. \b0 :
  27. \i0     
  28. \b None
  29. \b0 \
  30. //    
  31. \b\i INTERFACE
  32. \b0 :
  33. \i0     
  34. \b None
  35. \b0 \
  36. //    
  37. \b\i AUTHOR
  38. \b0 :        
  39. \b\i0 Rohit Khare
  40. \b0 \
  41. //    
  42. \b\i COPYRIGHT
  43. \b0 :    
  44. \f1\i0 ½
  45. \f0\b 1993,94 California Institure of Technology, eText Project\
  46.  
  47. \b0 //—————————————————————————————————————————————————————————————————————————————\
  48. //    
  49. \b\i Description
  50. \b0\i0 \
  51. //        The eTApp class is the abstract application controller. It contains the\
  52. //    core methods for managing documents and intialization. It does NOT manage\
  53. //    any of the application's user interface, nor is it designed to be AppKit-\
  54. //    dependent (e.g. it is not the delegate of any AppKit classes).\
  55. //\
  56. //        At creation, eTApp is responsible for loading several classes and\
  57. //    publishing global objects. During execution, it mainly issues requests\
  58. //    to open documents from disk. When the application quits, eTApp coordinates\
  59. //    with eTAppUI to ensure a graceful shutdown.\
  60. //—————————————————————————————————————————————————————————————————————————————\
  61. //    
  62. \b\i History
  63. \b0\i0 \
  64. //    09/21/94:    
  65. \b Revamped for eText5; cleanup.
  66. \b0 \
  67. //    01/24/94:    
  68. \b Navigator support, including preloading of etfd documents
  69. \b0 \
  70. //    01/11/94:    
  71. \b Revamped for the eText4 tree
  72. \b0 \
  73. //    09/09/93:    
  74. \b Added support for -uniqueID. This is an App-wide service.
  75. \b0 \
  76. //    08/22/93:    
  77. \b Moved "Accessor Methods" to eTDoc
  78. \b0 \
  79. //    08/22/93:    
  80. \b Added - loadToolFromPath; Added "Accessor Methods"\
  81.  
  82. \b0 //    08/16/93:    
  83. \b Created. Assumes other classes defined in eText.h
  84. \b0 \
  85. //—————————————————————————————————————————————————————————————————————————————\
  86. //    
  87. \b Imported Interfaces
  88. \b0 \
  89. //\
  90.     #import "
  91. \b eTextKernel.h
  92. \b0 "\
  93.     #import "
  94. \b eTAppUI.h
  95. \b0 "\
  96. \
  97. //—————————————————————————————————————————————————————————————————————————————\
  98. //    
  99. \b Global Object Handles
  100. \b0 \
  101. //\
  102.     extern 
  103. \b id
  104. \b0     /*    eTApp        */        
  105. \b etApp
  106. \b0 ;\
  107.     extern 
  108. \b id
  109. \b0     /*    eTAppUI        */        
  110. \b etAppUI
  111. \b0 ;\
  112.     extern 
  113. \b id
  114. \b0     /*    Inspector    */        
  115. \b inspector
  116. \b0 ;\
  117.     extern 
  118. \b id
  119. \b0     /*    UserModel    */        
  120. \b userModel
  121. \b0 ;\
  122.     extern 
  123. \b id
  124. \b0     /*    Navigator    */        
  125. \b navigator
  126. \b0 ;\
  127. \
  128.  
  129. \i @interface eTApp:Object 
  130. \i0 \{\
  131. //—————————————————————————————————————————————————————————————————————————————\
  132. //    
  133. \b Instance Variables
  134. \b0 \
  135. //\
  136.     HashTable    *
  137. \b docTable
  138. \b0 ;            // Maps docIDs to open doc objects\
  139.     HashTable    *
  140. \b agentTable
  141. \b0 ;        // Maps agent's name to factory classes\
  142.     HashTable    *
  143. \b annotationTable
  144. \b0 ;    // ditto for annotations\
  145.     HashTable    *
  146. \b typesTable
  147. \b0 ;        // registerForType:\
  148.     NXAtom        
  149. \b typesList
  150. \b0 [
  151. \fc1\cf1 MAX_PBOARD_TYPES
  152. \fc0\cf0 ]; // backup list of typesTable.\
  153.     \}\
  154. \
  155. //—————————————————————————————————————————————————————————————————————————————\
  156. //    
  157. \b Class Management
  158. \b0 \
  159. //\
  160.     - 
  161. \b init
  162. \b0 ;\
  163.     - 
  164. \b free
  165. \b0 ;\
  166. \
  167. //—————————————————————————————————————————————————————————————————————————————\
  168. //    
  169. \b Registration & Lookup
  170. \b0 \
  171. //\
  172.     - 
  173. \b registerType
  174. \b0 :(NXAtom) 
  175. \b pbType\
  176.                 for
  177. \b0 :(id)
  178. \b factoryClass
  179. \b0 ;\
  180.                 \
  181.     - 
  182. \b registerAgent
  183. \b0 :(id) 
  184. \b factoryClass
  185. \b0  \
  186.  
  187. \b                 name
  188. \b0 :(NXAtom) 
  189. \b name
  190. \b0 \
  191.  
  192. \b           menuLabel
  193. \b0 :(NXAtom) 
  194. \b label
  195. \b0 \
  196.  
  197. \b             menuKey
  198. \b0 :(char) 
  199. \b key
  200. \b0 ;\
  201. \
  202.     - 
  203. \b registerAnnotation
  204. \b0 :(id) 
  205. \b factoryClass
  206. \b0  \
  207.                      
  208. \b name
  209. \b0 :(NXAtom) 
  210. \b name
  211. \b0 \
  212.              
  213. \b RTFDirective
  214. \b0 :(NXAtom) 
  215. \b directive
  216. \b0 \
  217.                 
  218. \b menuLabel
  219. \b0 :(NXAtom) 
  220. \b label
  221. \b0 \
  222.                   
  223. \b menuKey
  224. \b0 :(char) 
  225. \b key
  226. \b0 \
  227.                  
  228. \b menuIcon
  229. \b0 :(NXImage*) 
  230. \b icon
  231. \b0 ;\
  232. \
  233.     - 
  234. \b registerAccessory
  235. \b0 :(NXAtom) 
  236. \b menuLabel
  237. \b0 \
  238.                      
  239. \b key
  240. \b0 :(char) 
  241. \b key
  242. \b0 \
  243.                     
  244. \b name
  245. \b0 :(NXAtom)
  246. \b  name
  247. \b0 \
  248.                  
  249. \b target
  250. \b0 :(id) 
  251. \b theTarget
  252. \b0 \
  253.                  
  254. \b action
  255. \b0 :(SEL) 
  256. \b theAction
  257. \b0 ;\
  258. \
  259.     - 
  260. \b annotationByName
  261. \b0 :(NXAtom) 
  262. \b name
  263. \b0 ;\
  264.     - 
  265. \b agentByName
  266. \b0 :(NXAtom) 
  267. \b name
  268. \b0 ;\
  269. \
  270. //—————————————————————————————————————————————————————————————————————————————\
  271. //    
  272. \b Document Management (by docID)
  273. \b0 \
  274. //\
  275.     - 
  276. \b openID
  277. \b0 :(long) 
  278. \b docID
  279. \b0 ;\
  280.     - 
  281. \b closeID
  282. \b0 : (long) 
  283. \b docID
  284. \b0 ;\
  285.     - (long) 
  286. \b createID
  287. \b0 ;\
  288.     - 
  289. \b documentByID
  290. \b0 : (long) 
  291. \b docID
  292. \b0 ;\
  293. \
  294. //—————————————————————————————————————————————————————————————————————————————\
  295. //    
  296. \b Global Operations
  297. \b0 \
  298. //\
  299.     - 
  300. \b saveAll
  301. \b0 ;\
  302.     - 
  303. \b shutdown
  304. \b0 :(BOOL) 
  305. \b cancellable
  306. \b0 ;\
  307. \
  308. //—————————————————————————————————————————————————————————————————————————————\
  309. //    
  310. \b Private Methods (for eTAppUI only)
  311. \b0 \
  312. //\
  313.     - (NXAtom*)
  314. \b typesList
  315. \b0 ;\
  316.     - 
  317. \b annotationByPboard
  318. \b0 :
  319. \b thePboard
  320. \b0 ;\
  321.     - (BOOL) 
  322. \b validateSaveAll
  323. \b0 ;\
  324.     - 
  325. \b loadToolFromPath
  326. \b0 :(const char*)
  327. \b path
  328. \b0 ;\
  329.     - 
  330. \b loadDocInfoFromPath
  331. \b0 :(const char*)
  332. \b path
  333. \b0 ;\
  334. \
  335.  
  336. \i @end
  337. }
  338.